import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import page from "@dfeidao/fd-w000010"
export default async function a001(fd: IFeidaoAiBrowserComponent, e: { page_no: number }) {
	// 分页
	const plan_list_name = fd.data.node.querySelector<HTMLInputElement>('[data-id="plan_list_name"]').value;
	const plan_type_no = fd.data.node.querySelector<HTMLSelectElement>('[data-id="plan_type_no"]');
	const plan_cla_attr_no = fd.data.node.querySelector<HTMLSelectElement>('[data-id="plan_cla_attr_no"]');
	const res = await nodejs('wangju/zj-000001/s001', {
		plan_list_name,
		page_no: e.page_no,
		filter: {
			plan_cla_attr_no: plan_cla_attr_no.value,
			plan_type_no: plan_type_no.value,
		}
	});
	render(fd, res, p001, 'p001', 'inner');
	const page = fd.data.node.querySelector<page>('[data-id="page"]');
	page.setAttribute('page-no', e.page_no + '');
	console.log(res);

}
